﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;

namespace LuoYi.Admin.Entities;

/// <summary>
/// 通知公告表
/// </summary>
[Table("sys_notice")]
public class SysNotice : IEntity
{
    /// <summary>
    /// 公告ID
    /// </summary>
    [Key]
    [Column("notice_id", TypeName = "int(4)")]
    public int NoticeId { get; set; }

    /// <summary>
    /// 公告标题
    /// </summary>
    [Column("notice_title")]
    [StringLength(50)]
    public string NoticeTitle { get; set; } = null!;

    /// <summary>
    /// 公告类型（1通知 2公告）
    /// </summary>
    [Column("notice_type")]
    [StringLength(1)]
    public string NoticeType { get; set; } = null!;

    /// <summary>
    /// 公告内容
    /// </summary>
    [Column("notice_content")]
    public byte[]? NoticeContent { get; set; }

    /// <summary>
    /// 公告状态（0正常 1关闭）
    /// </summary>
    [Column("status")]
    [StringLength(1)]
    public string? Status { get; set; }

    /// <summary>
    /// 创建者
    /// </summary>
    [Column("create_by")]
    [StringLength(64)]
    public string? CreateBy { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    [Column("create_time", TypeName = "datetime")]
    public DateTime? CreateTime { get; set; }

    /// <summary>
    /// 更新者
    /// </summary>
    [Column("update_by")]
    [StringLength(64)]
    public string? UpdateBy { get; set; }

    /// <summary>
    /// 更新时间
    /// </summary>
    [Column("update_time", TypeName = "datetime")]
    public DateTime? UpdateTime { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    [Column("remark")]
    [StringLength(255)]
    public string? Remark { get; set; }
}
